package com.netsdk.yushi.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author aqie
 * @Date 2022/3/26 17:03
 * @desc
 */
@NoArgsConstructor
@Data
public class YushiRequest {

    @JsonProperty("Reference")
    private String reference;
    @JsonProperty("Seq")
    private Integer seq;
    @JsonProperty("DeviceCode")
    private String deviceCode;
    @JsonProperty("Timestamp")
    private Integer timestamp;
    @JsonProperty("NotificationType")
    private Integer notificationType;
    @JsonProperty("FaceInfoNum")
    private Integer faceInfoNum;
    @JsonProperty("FaceInfoList")
    private List<FaceInfoListDTO> faceInfoList;
    @JsonProperty("CardInfoNum")
    private Integer cardInfoNum;
    @JsonProperty("CardInfoList")
    private List<?> cardInfoList;
    @JsonProperty("GateInfoNum")
    private Integer gateInfoNum;
    @JsonProperty("GateInfoList")
    private List<?> gateInfoList;
    @JsonProperty("LibMatInfoNum")
    private Integer libMatInfoNum;
    @JsonProperty("LibMatInfoList")
    private List<LibMatInfoListDTO> libMatInfoList;

    @NoArgsConstructor
    @Data
    public static class FaceInfoListDTO {
        @JsonProperty("ID")
        private Integer id;
        @JsonProperty("Timestamp")
        private Integer timestamp;
        @JsonProperty("CapSrc")
        private Integer capSrc;
        @JsonProperty("FeatureNum")
        private Integer featureNum;
        @JsonProperty("FeatureList")
        private List<FeatureListDTO> featureList;
        @JsonProperty("Temperature")
        private Double temperature;
        @JsonProperty("MaskFlag")
        private Integer maskFlag;
        @JsonProperty("PanoImage")
        private PanoImageDTO panoImage;
        @JsonProperty("FaceImage")
        private FaceImageDTO faceImage;
        @JsonProperty("FaceArea")
        private FaceAreaDTO faceArea;

        @NoArgsConstructor
        @Data
        public static class PanoImageDTO {
            @JsonProperty("Name")
            private String name;
            @JsonProperty("Size")
            private Integer size;
            @JsonProperty("Data")
            private String data;
        }

        @NoArgsConstructor
        @Data
        public static class FaceImageDTO {
            @JsonProperty("Name")
            private String name;
            @JsonProperty("Size")
            private Integer size;
            @JsonProperty("Data")
            private String data;
        }

        @NoArgsConstructor
        @Data
        public static class FaceAreaDTO {
            @JsonProperty("LeftTopX")
            private Integer leftTopX;
            @JsonProperty("LeftTopY")
            private Integer leftTopY;
            @JsonProperty("RightBottomX")
            private Integer rightBottomX;
            @JsonProperty("RightBottomY")
            private Integer rightBottomY;
        }

        @NoArgsConstructor
        @Data
        public static class FeatureListDTO {
            @JsonProperty("FeatureVersion")
            private String featureVersion;
            @JsonProperty("Feature")
            private String feature;
        }
    }

    @NoArgsConstructor
    @Data
    public static class LibMatInfoListDTO {
        @JsonProperty("ID")
        private Integer id;
        @JsonProperty("LibID")
        private Integer libID;
        @JsonProperty("LibType")
        private Integer libType;
        @JsonProperty("MatchStatus")
        private Integer matchStatus;
        @JsonProperty("MatchPersonID")
        private Integer matchPersonID;
        @JsonProperty("MatchFaceID")
        private Integer matchFaceID;
        @JsonProperty("MatchPersonInfo")
        private MatchPersonInfoDTO matchPersonInfo;

        @NoArgsConstructor
        @Data
        public static class MatchPersonInfoDTO {
            @JsonProperty("PersonName")
            private String personName;
            @JsonProperty("Gender")
            private Integer gender;
            @JsonProperty("CardID")
            private String cardID;
            @JsonProperty("IdentityNo")
            private String identityNo;
        }
    }
}
